<template>
  <div style="height:100vh;">
    <!--  子路由出口 -->
    <keep-alive>
      <router-view v-if="$route.meta && $route.meta.keepAlive" />
    </keep-alive>
    <router-view v-if="!$route.meta.keepAlive" />
    <!-- 底部 -->
    <van-tabbar v-model="active" class="homeBottomNav" fixed>
      <van-tabbar-item replace name="Task" to="/Task">
        <div class="fontStyle">
          <i class="iconfont icon-renwu" />
          <span>任务</span></div>
      </van-tabbar-item>
      <!-- <van-tabbar-item name="Saoma" to="/Saoma">
        <div class="fontStyle">
          <i class="iconfont icon-saoma1" />
          <span>扫码</span></div>
      </van-tabbar-item> -->
      <van-tabbar-item name="My" to="/My">
        <div class="fontStyle">
          <i class="iconfont icon-wode" />
          <span>我的</span></div>
      </van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  name: 'Home',
  data () {
    return {
      active: this.$route.name,
      navList: [
        {
          id: '1',
          name: '',
          to: ''
        }
      ]
    }
  },
  mounted () {
  },
  methods: {
  }
}
</script>

<style lang='scss' scoped>
.homeBottomNav {
  width: 100vw;
  height: 8vh;
  background: #f6f6f6;
  border-top: 1px solid rgb(230, 230, 230);
  z-index: 10;
  .fontStyle{
    height: 8vh;
    font-size: 20px;
    text-align: center;
    font-weight: normal;
    border-radius: 10px;
    letter-spacing: 3px;
    i{
      font-size: 30px;
    }
    span{
      margin: 5px 0;
      display: block;
      width: 100%;

    }
  }
}
</style>
<style lang='scss'>
.homeBottomNav .van-tabbar-item__text{
    width: 33.33vw;
    height: 5vh;
}
.van-tabbar{
  height: 8vh;
}
.homeBottomNav {
  .van-tabbar-item{
    width: 33.33vw;
    height: 8vh;
    padding: 0;
    margin: 0;
  }
  .van-tabbar-item--active{
    background: -webkit-linear-gradient(#1CACFF, #022566);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}
</style>
